package com.freewater.javabase.demo.designpattern.vistor;

// 客户端代码
public class VisitorPatternDemo {
    public static void main(String[] args) {
        ComputerPart computer = new Computer();
        computer.accept(new ComputerPartDisplayVisitor());

        /*
        输出:
        Displaying Mouse.
        Displaying Keyboard.
        Displaying Monitor.
        Displaying Computer.
        */
    }
}
